<%@ page import="mybatis.dao.Mybatis" %>
<%@ page import="mybatis.yang.Book" %>
<%@ page import="mybatis.yang.Books" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2017/11/29
  Time: 12:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
        <%
            String name=request.getParameter("name");
            Mybatis mybatis=new Mybatis();
            Books book=mybatis.selectBookid(name);
            int id=book.getId();
            String product_id=Integer.toString(id);
            //准确来说应该是每次结账之后购物车换一次,但我没办法做结账了,就简单一点固定了.
            //购物车id固定为9了.
            String order_id="9";
            mybatis.insert_order_product_id(order_id,product_id);
        %>

        <center>
        <h2>已经成功加入购物车<br><a href="productInfo.jsp">点击返回购物界面</a></h2>
        </center>
</body>
</html>
